import java.util.*;

public class Problem {
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int t= scanner.nextInt();
        while (t-->0){
            int num= scanner.nextInt();
            String str=scanner.next();
            int sum=0;
            char[] arr=str.toCharArray();
            int sumA=0,sumB=0,sumC=0,sumD=0;
            for (int i = 0; i < arr.length; i++) {
                if(arr[i]=='A'&&sumA<num){
                    sum++;
                    sumA++;
                }
                if(arr[i]=='B'&&sumB<num){
                    sum++;
                    sumB++;
                }
                if(arr[i]=='C'&&sumC<num){
                    sum++;
                    sumC++;
                }
                if(arr[i]=='D'&&sumD<num){
                    sum++;
                    sumD++;
                }
            }
            System.out.println(sum);
        }
    }
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();

        while (t-- > 0) {
            int n = scanner.nextInt();
            long[] a = new long[n];
            int oddCount = 0, evenCount = 0;

            for (int i = 0; i < n; i++) {
                a[i] = scanner.nextInt();
                if (a[i] % 2 == 0) evenCount++;
                else oddCount++;
            }
            if (oddCount == 0 || evenCount == 0) {
                System.out.println(0);
            } else {
                Arrays.sort(a);
                if(a[n-1]%2==0){
                    long maxOdd=0;
                    int i=0;
                    while (i<n-1){
                        if(a[i]%2==0){
                            for (int j = 0; j < n-1; j++) {
                                if(a[j]%2!=0&&a[j]>maxOdd){
                                    maxOdd=a[j];
                                }
                            }
                            maxOdd=maxOdd+a[i];
                            a[i]=maxOdd;
                        }
                        i++;
                    }
                    if(maxOdd<a[n-1]){
                        evenCount++;
                    }
                }
                System.out.println(evenCount);
            }
        }
        scanner.close();
    }

}